package com.morehair.service.admin;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.morehair.bean.bo.admin.*;
import com.morehair.bean.pojo.Admin;
import com.morehair.bean.pojo.Log;
import com.morehair.bean.pojo.Role;
import com.morehair.bean.pojo.Storage;
import com.morehair.bean.vo.admin.DashboardVo;
import com.morehair.bean.vo.admin.OptionVo;
import com.morehair.bean.vo.admin.PermissionVo;
import com.morehair.bean.vo.admin.TotalAndItemsVo;

import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Map;

/**
 * Author  kkw
 * Date  2021/6/4 21:15
 * Version 1.0
 * Description :
 */
public interface SystemService {
    DashboardVo countAll();


    TotalAndItemsVo<Admin> selecetAdminsByBo(AdminBo adminBo);

    List<OptionVo> selectAllRole();

    Admin creatAdmin(Admin admin) throws NoSuchAlgorithmException;

    Admin updateAdmin(Admin admin) throws NoSuchAlgorithmException;

    boolean deleteAdmin(Admin admin);

    TotalAndItemsVo<Role> selectAllRoleBypage(RoleBo roleBo);

    Role insertRole(Map<String, String> map);

    Role updateRole(Role role);

    boolean deleteRole(Role role) throws JsonProcessingException;

    TotalAndItemsVo<Log> selectLogsByPage(LogBo logBo);

    PermissionVo getPermission(Integer roleId);

    boolean changePermission(RolePermissionBo rolePermissionBo);


    TotalAndItemsVo<Storage> getStorage(StorageListBo storageListBo);
}
